<template>
  子组件
  <br />
  子组件的msg输入框1：
  <input type="text" v-model="propsMsg" />
  <br />
  子组件的title输入框1：
  <input type="text" v-model="propsTitle" />
</template>

<script>
export default {
  props: ['msg', 'title'],
  data() {
    return {}
  },
  emits: ['update:msg', 'update:title'],
  computed: {
    propsMsg: {
      get() {
        return this.msg
      },
      set(newValue) {
        this.$emit('update:msg', newValue)
      },
    },
    propsTitle: {
      get() {
        return this.title
      },
      set(newValue) {
        this.$emit('update:title', newValue)
      },
    },
  },
}
</script>

<style scoped></style>
